package memento;

import java.util.Stack;

public class GestionnaireMemento {
	private Stack<Memento> savedStates = new Stack<Memento>();
	
	public void addMemento(Memento memento) {
		savedStates.push(memento);
	}
	
	public Memento getMemento() {
		if (savedStates.size() != 0)
			return savedStates.pop();
		else
			return null;
	}
}
